/******************************************************************************
 * * watch_msg_handle.h -
 *
 * *(C) Copyright 2019 ASR International Ltd.
 * * All Rights Reserved
 * ******************************************************************************/
#ifndef WATCH_MSG_HANDLE_H
#define WATCH_MSG_HANDLE_H

#ifdef __cplusplus
extern "C" {
#endif

// UI_INTER_MSG_ID of watch UI
enum
{
    MMI_MODEM_POWER_UP_CNF = UI_MSG_WATCH_UI_BASE,
    MMI_MODEM_POWER_OFF_CNF,
    MMI_MODEM_CALL_RESPONSE_ORIGINATING,
    MMI_MODEM_CALL_RESPONSE_GET_CUR_CALLS,
    MMI_MODEM_CALL_RESPONSE_ALERTING,
    MMI_MODEM_CALL_RESPONSE_RING,
    MMI_MODEM_CALL_RESPONSE_CONNECT,
    MMI_MODEM_CALL_RESPONSE_DISCONNECT,
    MMI_MODEM_CALL_RESPONSE_NO_CARRIER,
    MMI_MODEM_CALL_RESPONSE_DIAL,
    MMI_MODEM_CALL_RESPONSE_CLIP,
    MMI_MODEM_CALL_RESPONSE_CCWA,
    MMI_MODEM_CALL_RESPONSE_STATE_CHANGE,
    MMI_MODEM_CALL_RESPONSE_REMOTE_HOLD,
    MMI_MODEM_CALL_RESPONSE_CMUT,
    MMI_MODEM_CALL_RESPONSE_CEER,
    MMI_MODEM_PIN_STATUS_CHANGE_IND,
    MMI_MODEM_PLMN_SEARCH_CNF,
    MMI_MODEM_CALL_FORWARD_SET_CNF,
    MMI_MODEM_CALL_FORWARD_QUERY_CNF,
    MMI_MODEM_CALL_WAIT_SET_CNF,
    MMI_MODEM_CALL_WAIT_QUERY_CNF,
    MMI_MODEM_SIGNAL_BAR_IND,
    MMI_MODEM_OPERATOR_IND,
    MMI_MODEM_TIME_UPDATE_IND,
    MMI_MODEM_SIM_STATUS_IND,
    MMI_MODEM_GET_PHONEBOOK_STATUS_CNF,
    MMI_MODEM_WRITE_PHONEBOOK_CNF,
    MMI_MODEM_READ_PHONEBOOK_CNF,
    MMI_MODEM_PHONEBOOK_INIT_IND,
    MMI_MODEM_SEND_SMS_CNF,
    MMI_MODEM_DELETE_SMS_CNF,
    MMI_MODEM_READ_SMS_INFO_CNF,
    MMI_MODEM_READ_SMS_DETAIL_ON_SIM_CNF,
    MMI_MODEM_GET_SMSC_CNF,
    MMI_MODEM_SET_SMSC_CNF,
    MMI_MODEM_SET_DELIVERY_REP_CNF,
    MMI_MODEM_REP_NEW_SMS_IND,
    MMI_MODEM_SMS_STATUS_REP_IND,
    MMI_MODEM_SIM_SMS_STORAGE_STATUS_IND,
    MMI_MODEM_SEND_USSD_CNF,
    MMI_MODEM_LTE_CELLS_INFO,
    MMI_MODEM_GSM_CELLS_INFO,
    MMI_HAL_LOW_POWER_IND,
    MMI_APP_ADAPTOR_VOICE_MSG_RCV_IND,
    MMI_APP_ADAPTOR_VOICE_MSG_SEND_CNF,
    MMI_FOTA_CHECK_VERSION_IND,
    MMI_FOTA_DOWNLOAD_PERCENT_IND,
    MMI_FOTA_RESTART_IND,
    MMI_FOTA_RESULT_IND,
    MMI_MODEM_IMS_VOPS_IND,
    MMI_MODEM_CALI_RESULT_IND,
    MMI_MODEM_SN_INFO_IND,
    MMI_MODEM_VIDEO_CALL_RESPONSE_INCOMING,
    MMI_MODEM_VIDEO_CALL_RESPONSE_RING,
    MMI_MODEM_VIDEO_CALL_RESPONSE_CONNECT,
    MMI_MODEM_VIDEO_CALL_RESPONSE_DISCONNECT,
    MMI_MODEM_VIDEO_CALL_RESPONSE_BOTTOM_ERR,
    MMI_MODEM_VIDEO_CALL_RESPONSE_NEED_REDIAL,
    MMI_MODEM_VIDEO_CALL_RESPONSE_AUTO_TEST,
    MMI_MODEM_VIDEO_CALL_RESPONSE_TEST_STOP,
    MMI_MODEM_VIDEO_CALL_RESPONSE_TEST_VOICE_MO_REQ,
    MMI_MODEM_VIDEO_CALL_RESPONSE_TEST_MT_CALL,
    MMI_MODEM_VIDEO_CALL_RESPONSE_TEST_VIDEO_MO_REQ,
    MMI_MODEM_VIDEO_CALL_RESPONSE_TEST_REJ_CALL,
    MMI_MODEM_VIDEO_CALL_RESPONSE_TEST_CMD_BEGIN,
    MMI_MODEM_VIDEO_CALL_RESPONSE_TEST_CMD_END,
};

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
} mmi_msg_power_up_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
} mmi_msg_power_off_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    int8_t                index;
} mmi_msg_call_response_originating_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_Modem_Call_Rsp_Get_Current_Calls_t *calls;
} mmi_msg_call_response_get_cur_calls_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    int8_t                index;
} mmi_msg_call_response_alerting_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    int8_t                index;
} mmi_msg_call_response_ring_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    int8_t                index;
} mmi_msg_call_response_connect_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    int8_t                index;
} mmi_msg_call_response_disconnect_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    int8_t                index;
    uint8_t               isNoCarrier;
} mmi_msg_call_response_no_carrier_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    uint8_t               isOk;
} mmi_msg_call_response_dial_t;

typedef struct
{
    UI_Inter_Msg_Header_t          header;
    MMI_MODEM_SIM_ID               simid;
    int8_t                         index;
    MMI_Modem_Call_Response_Clip_t *clip;
} mmi_msg_call_response_clip_t;

typedef struct
{
    UI_Inter_Msg_Header_t          header;
    MMI_MODEM_SIM_ID               simid;
    int8_t                         index;
    MMI_Modem_Call_Response_Ccwa_t *ccwa;
} mmi_msg_call_response_ccwa_t;

typedef struct
{
    UI_Inter_Msg_Header_t                  header;
    MMI_Modem_Call_Response_State_Change_t *state;
} mmi_msg_call_response_state_change_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    int8_t                index;
    uint8_t               ishold;
} mmi_msg_call_response_remote_hold_t;

typedef struct
{
    UI_Inter_Msg_Header_t          header;
    MMI_MODEM_SIM_ID               simid;
    MMI_Modem_Call_Response_Cmut_t *cmut;
} mmi_msg_call_response_cmut_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    char                  *ceer;
} mmi_msg_call_response_ceer_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    MMI_MODEM_SIM_ID          simid;
    MMI_MODEM_PIN_STATUS_TYPE pinreqtype;
} mmi_msg_pin_status_change_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t       header;
    MMI_Modem_Plmn_Search_Cnf_t *plmnsearchcnf;
} mmi_msg_plmn_search_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    MMI_MODEM_RESULT      result;
} mmi_msg_call_forward_set_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t         header;
    MMI_MODEM_SIM_ID              simid;
    MMI_MODEM_RESULT              result;
    MMI_Modem_Call_Forward_Info_t *CallForwardInfo;
} mmi_msg_call_forward_query_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    MMI_MODEM_RESULT      result;
} mmi_msg_call_wait_set_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    uint8_t               callwaiton;
    MMI_MODEM_RESULT      result;
} mmi_msg_call_wait_query_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    MMI_MODEM_SIGNAL_BAR  bar;
} mmi_msg_signal_bar_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    char *Operator;
    MMI_MODEM_PLMN_RAT rat;
} mmi_msg_operator_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_Modem_Time_Info_t *TimeInfo;
} mmi_msg_time_update_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t  header;
    MMI_Modem_Sim_Status_t *SimStatus;
} mmi_msg_sim_status_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    uint16_t              total;
    uint16_t              used;
    uint16_t              firstIndex;
} mmi_msg_get_phonebook_status_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
} mmi_msg_delete_phonebook_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    uint16_t              writtenindex;
} mmi_msg_write_phonebook_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_Modem_Contact     *contact;
    uint16_t              number;   // the number of contacts read from SIM phonebook
    BOOL                  end;      /* the all of contacts are read completely if true,
                                     * otherwise, wait for the next cnf.
                                     * the maximum number of contacts read from SIM in a cnf
                                     * according to MMI_MODEMADP_SIM_READ_PB_NUM */
} mmi_msg_read_phonebook_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
} mmi_msg_phonebook_init_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t    header;
    MMI_Modem_Send_Sms_Cnf_t *psendsmscnf;
} mmi_msg_send_sms_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t      header;
    MMI_Modem_Delete_Sms_Req_t *pdeletesms;
} mmi_msg_delete_sms_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t         header;
    MMI_Modem_Read_Sms_Info_Cnf_t *preadsmsinfocnf;
} mmi_msg_read_sms_info_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t                  header;
    MMI_Modem_Read_Sms_Detail_On_Sim_Cnf_t *preadsmscnf;
} mmi_msg_read_sms_detail_on_sim_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t    header;
    MMI_Modem_Get_Smsc_Cnf_t *pgetsmsccnf;
} mmi_msg_get_smsc_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    MMI_MODEM_SMS_RESULT_TYPE result;
} mmi_msg_set_smsc_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    MMI_MODEM_SMS_RESULT_TYPE result;
} mmi_msg_set_delivery_rep_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t          header;
    MMI_Modem_Report_New_Sms_Ind_t *prepnewsms;
} mmi_msg_rep_new_sms_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t                   header;
    MMI_Modem_Response_Sms_Status_Rep_Ind_t *psmsstsrep;
} mmi_msg_sms_status_rep_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t                  header;
    MMI_Modem_SIM_SMS_Storage_Status_Ind_t *prepsimsmsstaind;
} mmi_msg_sim_sms_storage_status_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    MMI_Modem_Send_Ussd_Cnf_t *psendussdcnf;
} mmi_msg_send_ussd_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    MMI_Modem_Lte_Cells_t     *pltecells;
} mmi_msg_lte_cells_info_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    MMI_Modem_Gsm_Cells_t     *pgsmcells;
} mmi_msg_gsm_cells_info_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    uint32_t              bat_percent;
} mmi_msg_low_power_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t   header;
    app_adaptor_voice_msg_t *msg;
} mmi_msg_app_adaptor_voice_msg_rcv_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t            header;
    watch_app_adp_voice_msg_result_t result;
} mmi_msg_app_adaptor_voice_msg_send_cnf_t;

typedef struct
{
    UI_Inter_Msg_Header_t   header;
    void *version;
} mmi_msg_fota_check_version_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t   header;
    INT32 percent;
} mmi_msg_fota_download_percent_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t   header;
} mmi_msg_fota_restart_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t   header;
    INT32 result;
} mmi_msg_fota_result_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t            header;
    uint8_t                          display_sendsms_flg;  //0:display not send sms,1:display send sms
} mmi_msg_ims_vops_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    uint8_t                   result;
} mmi_msg_cali_rslt_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t     header;
    char                      *psn;
} mmi_msg_sn_info_ind_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_Modem_Video_Call_Response_Incoming_t *incoming;
} mmi_msg_video_call_response_incoming_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
} mmi_msg_video_call_common_response_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    char uri[VIDEO_CALL_URI_MAX_LEN];
} mmi_msg_video_call_response_test_mo_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    MMI_MODEM_RESULT      result;
} mmi_msg_call_forward_set_t;

typedef struct
{
    UI_Inter_Msg_Header_t header;
    MMI_MODEM_SIM_ID      simid;
    MMI_MODEM_RESULT      result;
    MMI_Modem_Call_Forward_Info_t * call_forward_info;
} mmi_msg_call_forward_query_t;

void watch_message_handle_init(void);
void watch_message_handle_init_for_charging(void);
void watch_message_handle_destroy(void);
#ifdef __cplusplus
}
#endif
#endif
